/********************************************************************
	created:		2009:1:14   21:11
	filename: 	director.h
	author:		kong
	E-mail:		guoqing.kong@gmail.com
	purpose:	director
*********************************************************************/

#pragma  once
#include <string>
#include <vector>
#include "goaway.h"
using namespace std;

class Builder;

class Director
{
public:
	Director(Builder* b)
	{
		this->builder = b;
	}
	~Director()
	{
		delete(this->builder);
		builder = NULL;
	}
public:
	int construct(string fromCity, string toCity, string date ,string fileName) 
	{
		int ret = XX_OK;

		//ret = builder->makeCraw(fromCity,  toCity, date);
		//if (ret != XX_OK)return ret;

		//ret =builder->getContent();
		//if (ret != XX_OK)return ret;

		ret = builder->makeParse(fileName);
		return ret;
	}

private:
	Builder* builder;

};